<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>文章列表--layui后台管理模板 2.0</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../../../public/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="../../../public/plugin/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
	<link rel="stylesheet" href="../../../public/css/public.css" media="all" />
</head>

<body class="childrenBody">
	
	<blockquote class="layui-elem-quote layui-search-quote layui-row">
		<form class="layui-form">

			<div class="layui-col-md4">
				<div class="layui-form-item">
					<label class="layui-form-label">标题</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input searchVal" placeholder="请输入标题">
					</div>
				</div>
			</div>
			<div class="layui-col-md4">
				<div class="layui-form-item">
					<label class="layui-form-label">发布时间</label>
					<div class="layui-input-block">
						<select name="city" e-verify="required">
							<option value="">请选择一个时间段</option>
							<option value="1">一周内</option>
							<option value="2">一月内</option>
							<option value="3">一年内</option>
						</select>
					</div>
				</div>
			</div>


			<div class="layui-col-md4 btn-search">
				<div class="layui-form-item">
					<a class="layui-btn search_btn" data-type="reload">搜索</a>
					<a class="layui-btn layui-btn-primary search_btn" data-type="reload">重置</a>

				</div>
			</div>
		</form>
	</blockquote>


	<div class="btn">
		<hr>
	</div>	

	<div class="layui-col-md8">
		<table id="egList02" lay-filter="egList"></table>				
		<!--操作-->
		<script type="text/html" id="egListBar">
			<a class="iconfont icon-detail" title="详情" lay-event="look"></a>
			<!-- <a class="iconfont icon-edit" title="编辑" lay-event="edit"></a>
			<a class="iconfont icon-del" title="删除" lay-event="del"></a> -->
		</script>
	</div>


	<div class="layui-col-md4" id="abc">

	</div>

<script type="text/javascript" src="../../../public/js/jquery.min.js"></script>
<script type="text/javascript" src="../../../public/layui/layui.js"></script>
<script type="text/javascript" src="../../../public/js/echarts.min.js"></script>
<script type="text/javascript" src="../../../public/plugin/zTree/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="egList.js"></script>
<script>


layui.use(['form','layer','laydate','table','laytpl'],function(){
    var form = layui.form,
        layer = parent.layer === undefined ? layui.layer : top.layer,
        $ = layui.jquery,
        laydate = layui.laydate,
        laytpl = layui.laytpl,
        table = layui.table;

    //示例列表
    var tableIns = table.render({
        elem: '#egList02',

        //测试效果，暂时用的假数据
        url: '/json/newsList.json',
        page: true,
        cellMinWidth : 95,
        height : "full-115",
        limit : 15,
        limits : [10,15,20,25],
        id : "egListTable",
        cols : [[
            {type: "checkbox", fixed:"left", width:50},
            
			{field: 'newsName', title: '咨询标题', width: 400 },
			
            {field: 'newsStatus', title: '状态', align:'center',templet:function (data) {
                if(data.newsStatus == 0){
                    return "<span style='color: #1E9FFF;'>待处理</span>"
                }else if(data.newsStatus == 1){
                    return "<span>已处理</span>"
                }else if(data.newsStatus == 2){
                    return "<span>已处理</span>"
                }else if(data.newsStatus == 3){
                    return "<span>已处理</span>"
                }
			}},
			
            {field: 'newsAuthor', title: '来源', align: 'center' },
            
            {field: 'newsTime', title: '提交时间', align:'center', minWidth:200},
            {title: '操作', width: 80, fixed: "right", templet:'#egListBar',fixed:"right",align:"center"}
        ]]
	});
});





var wh = $(window).height();
var eh = wh-95;
$("#abc").css("height", eh)



// 基于准备好的dom，初始化echarts实例(风格化图表)
var myChart = echarts.init(document.getElementById('abc'), 'macarons');
// 指定图表的配置项和数据

option = {
    title: {
        text: ' ',
        subtext: ' ',
        sublink: ' '
    },
    tooltip : {
        trigger: 'axis',
        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
        },
        formatter: function (params) {
            var tar;
            if (params[1].value != '-') {
                tar = params[1];
            }
            else {
                tar = params[0];
            }
            return tar.name + '<br/>' + tar.seriesName + ' : ' + tar.value;
        }
    },
    legend: {
        data:['新增', '减少']
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: {
        type : 'category',
        splitLine: {show:false},
        data :  function (){
            var list = [];
            for (var i = 3; i <= 8; i++) {
                list.push( i + '月');
            }
            return list;
        }()
    },
    yAxis: {
        type : 'value'
    },
    series: [
        {
            name: '辅助',
            type: 'bar',
            stack: '总量',
            itemStyle: {
                normal: {
                    barBorderColor: 'rgba(0,0,0,0)',
                    color: 'rgba(0,0,0,0)'
                },
                emphasis: {
                    barBorderColor: 'rgba(0,0,0,0)',
                    color: 'rgba(0,0,0,0)'
                }
            },
            data: [0, 900, 1245, 1530, 1376, 1536]
        },
        {
            name: '新增',
            type: 'bar',
            stack: '总量',
            label: {
                normal: {
                    show: true,
                    position: 'top'
                }
            },
            data: [900, 345, 393, '-', '-', 335]
        },
        {
            name: '减少',
            type: 'bar',
            stack: '总量',
            label: {
                normal: {
                    show: true,
                    position: 'bottom'
                }
            },
            data: ['-', '-', '-', 108, 154, '-',]
        }
    ]
};


// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);




</script>
</body>
</html>